package com.tydic.common.redis.constant;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@Getter
public enum RedisKey {

    ACCOUNT_REGISTER_INFO("ACCOUNT_REGISTER_INFO_"),
    MANAGE_VERIFICATION_CODE("MANAGE_VERIFICATION_CODE."),
    IMAGE_CODE("IMAGE_CODE_"),
    SMS_CODE("SMS_CODE_"),
    SMS_TOKEN("SMS_TOKEN_"),
    PASSWORD_TRY_TIMES("PASSWORD_TRY_TIMES_"),
    LOCK_ACCOUNT("LOCK_ACCOUNT_"),

    API_USER_REALM_AUTHENTICATION("API_USER_REALM_AUTHENTICATION_"),
    API_USER_REALM_AUTHORIZATION("API_USER_REALM_AUTHORIZATION_"),

    PLACE_ORDER_CACHE("place_order_cache_"),

    AES_KEY("AES_KEY_"),
    AES_IV("AES_IV_"),

    PAY_ORDER("PAY_ORDER_"),

    ENTERPRISE_SIGN_CONTRACT("ENTERPRISE_SIGN_CONTRACT_"),

    BORDERER_SIGN_CONTRACT("BORDERER_SIGN_CONTRACT_"),

    USER_TYPE("USER_TYPE_"),

    ;
    private final String prefix;


    public String createRedisKey(String key) {
        String redisKey = prefix + key;
        return redisKey.toLowerCase().trim();
    }


}

